1 /* 2 3 Boost Software License - Version 1.0 - August 17th, 2003 4 5 Permission is hereby granted, free of charge, to any person or organization 6 obtaining a copy of the software and accompanying documentation covered by 7 this license (the "Software") to use, reproduce, display, distribute, 8 execute, and transmit the Software, and to prepare derivative works of the 9 Software, and to permit third-parties to whom the Software is furnished to 10 do so, all subject to the following: 11 12 The copyright notices in the Software and this entire statement, including 13 the above license grant, this restriction and the following disclaimer, 14 must be included in all copies of the Software, in whole or in part, and 15 all derivative works of the Software, unless such copies or derivative 16 works are solely in the form of machine-executable object code generated by 17 a source language processor. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 DEALINGS IN THE SOFTWARE. 26 27 */ 28 29 module derelict.purple.stringref; 30 31 extern (C): 32 33 alias _PurpleStringref PurpleStringref; 34 35 struct _PurpleStringref; 36 37 38 version(Derelict_Link_Static) 39 { 40 extern( C ) nothrow 41 { 42 PurpleStringref* purple_stringref_new(const(char)* value); 43 PurpleStringref* purple_stringref_new_noref(const(char)* value); 44 PurpleStringref* purple_stringref_printf(const(char)* format, ...); 45 PurpleStringref* purple_stringref_ref(PurpleStringref* stringref); 46 void purple_stringref_unref(PurpleStringref* stringref); 47 const(char)* purple_stringref_value(const(PurpleStringref)* stringref); 48 int purple_stringref_cmp(const(PurpleStringref)* s1, const(PurpleStringref)* s2); 49 size_t purple_stringref_len(const(PurpleStringref)* stringref); 50 } 51 } 52 else 53 { 54 extern( C ) nothrow 55 { 56 alias da_purple_stringref_new = PurpleStringref* function(const(char)* value); 57 alias da_purple_stringref_new_noref = PurpleStringref* function(const(char)* value); 58 alias da_purple_stringref_printf = PurpleStringref* function(const(char)* format, ...); 59 alias da_purple_stringref_ref = PurpleStringref* function(PurpleStringref* stringref); 60 alias da_purple_stringref_unref = void function(PurpleStringref* stringref); 61 alias da_purple_stringref_value = const(char)* function(const(PurpleStringref)* stringref); 62 alias da_purple_stringref_cmp = int function(const(PurpleStringref)* s1, const(PurpleStringref)* s2); 63 alias da_purple_stringref_len = size_t function(const(PurpleStringref)* stringref); 64 } 65 66 __gshared 67 { 68 da_purple_stringref_new purple_stringref_new; 69 da_purple_stringref_new_noref purple_stringref_new_noref; 70 da_purple_stringref_printf purple_stringref_printf; 71 da_purple_stringref_ref purple_stringref_ref; 72 da_purple_stringref_unref purple_stringref_unref; 73 da_purple_stringref_value purple_stringref_value; 74 da_purple_stringref_cmp purple_stringref_cmp; 75 da_purple_stringref_len purple_stringref_len; 76 } 77 }